﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WIKID.Model;
using WIKID.Accessor;

namespace WIKID.Controller
{
    class LectureController
    {
        public static List<LectureModel> lectureDictionary;
        public LectureController(String lectureFileAbsolutePath)
        {
            lectureDictionary = new XMLReader().getLecturesByXmlFileName(lectureFileAbsolutePath);
        }
        public String getLectureIDbyLectureFilePath(String lectureFilePath)
        {
            foreach(LectureModel lecture in lectureDictionary)
            {
                if (lectureFilePath.ToLower().Contains(lecture.LectureQuestion.ToLower()))
                    return lecture.LectureId;
            }
            return "0";
        }


    }
}
